<script setup>
//导入ref
import { ref, onMounted} from 'vue'
const count = ref(0)
//定义一个函数 完成add
function add (){
  count.value++
}
//声明钩子函数
onMounted(() =>{
  console.log('组件挂载完成')
})
</script>

<template>
  <button @click="add">count is:{{count}}</button>
</template>

<style scoped>

</style>